import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 *The class Strawberry is a powerUp that will change the variable powerUp of the class Player that is touching it.
 * It uses the method move from the superclass.
 * @author Manuel Nava
 * @version 1.0
   */
public class Strawberry extends PowerUp
{
    
    /**
     * The act method calls the super class method move and the World class method powerUp to set the powerUp
     * int the class Player.
       */
    public void act() 
    {
        super.move();
        if(isTouching(Player.class))
        {
            ((CaveWorld)(getWorld())).powerUp(2);
            getWorld().removeObject(this);
        }
    }    
}
